/// id : 111
/// categoryId : 111
/// createTime : "2019-02-16 09:46:48"
/// studyUserNumber : 0
/// updateTime : "2019-02-16 09:46:48"
/// userFinishNumber : 0
/// videoCourseImage : ""
/// videoCourseInfo : ""
/// videoCourseName : "煤矿安全知识通用教育"
/// videoCourseStatus : 0
/// videoNumber : 0

class BeanVideoCourse {
  int id;
  int categoryId;
  String createTime;
  int studyUserNumber;
  String updateTime;
  int userFinishNumber;
  String videoCourseImage;
  String videoCourseInfo;
  String videoCourseName;
  int videoCourseStatus;
  int videoNumber;
  int myStudyNumber;
  int showNumber;

  ///用户视频完成的比例
  double finishPrent;

  static BeanVideoCourse fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    BeanVideoCourse beanVideoCourseBean = BeanVideoCourse();
    beanVideoCourseBean.id = map['id'];
    beanVideoCourseBean.categoryId = map['categoryId'];
    beanVideoCourseBean.finishPrent = map['finishPrent'];
    beanVideoCourseBean.showNumber = map['showNumber'];
    beanVideoCourseBean.studyUserNumber = map['studyUserNumber'];
    beanVideoCourseBean.userFinishNumber = map['userFinishNumber'];
    beanVideoCourseBean.videoCourseImage = map['videoCourseImage'];
    beanVideoCourseBean.videoCourseInfo = map['videoCourseInfo'];
    beanVideoCourseBean.videoCourseName = map['videoCourseName'];
    beanVideoCourseBean.videoCourseStatus = map['videoCourseStatus'];
    beanVideoCourseBean.videoNumber = map['videoNumber'];
    beanVideoCourseBean.myStudyNumber = map['myStudyNumber'];

    return beanVideoCourseBean;
  }

  Map toJson() => {
        "id": id,
        "categoryId": categoryId,
        "studyUserNumber": studyUserNumber,
        "userFinishNumber": userFinishNumber,
        "videoCourseImage": videoCourseImage,
        "videoCourseInfo": videoCourseInfo,
        "videoCourseName": videoCourseName,
        "videoCourseStatus": videoCourseStatus,
        "videoNumber": videoNumber,
      };
}

class AppCourseLineSignResponseEntity {
  bool isOpen;
  String message;
  int code;

  AppCourseLineSignResponseEntity(this.isOpen, this.message);

  AppCourseLineSignResponseEntity.fromMap(Map<String, dynamic> map) {
    isOpen = map["open"] ?? false;
    code = map["code"] ?? 200;
    message = map["message"] ?? "暂不可签到";
  }
}

class AppCourseLineSignStatEntity {
  String statStr1;
  String statStr2;

  AppCourseLineSignStatEntity.fromMap(Map<String, dynamic> map) {
    statStr1 = map["statStr1"] ?? "--";
    statStr2 = map["statStr2"] ?? "--";
  }
}

class UserStudyCourseBean {
  int id;
  String courseName;
  int videoCourseId;
  String createTime;
  String updateTime;

  String videoName;
  int studySecond = 0;
  int videoSecond = 0;
  int studyNumber = 0;
  ///0 学习未完成  1学习完成
  int studyFinish = 0;

  ///课件类型 0 视频 1 PPT 2  视频代码连接
  int videoTypes = 0;

  static UserStudyCourseBean fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    UserStudyCourseBean beanVideoCourseBean = UserStudyCourseBean();
    beanVideoCourseBean.id = map['id'];
    beanVideoCourseBean.courseName = map['courseName'];
    beanVideoCourseBean.videoCourseId = map['videoCourseId'];
    beanVideoCourseBean.createTime = map['createTime'];
    beanVideoCourseBean.updateTime = map['updateTime'];

    beanVideoCourseBean.videoTypes = map['videoTypes'] ?? 0;
    beanVideoCourseBean.studyFinish = map['studyFinish'] ?? 0;
    beanVideoCourseBean.studySecond = map['studySecond'] ?? 0;
    beanVideoCourseBean.videoSecond = map['videoSecond'] ?? 0;
    beanVideoCourseBean.studyNumber = map['studyNumber'] ?? 0;

    beanVideoCourseBean.videoName = map['videoName'];
    return beanVideoCourseBean;
  }
}
